#include<linux/module.h>
#include<linux/interrupt.h>
#include<linux/init.h>
MODULE_LICENSE("GPL");
static unsigned long data=0;
static struct tasklet_struct tasklet;

static void irq_tasklet_action(unsigned long data)
{
	printk("in the irq_tasklet_action the state of the tasklet is:%ld\n",
			(&tasklet)->state);
	printk("tasklet running.by author\n");
	return ;
}
static int __init __tasklet_schedule_init(void)
{
	printk("into __tasklet_schedule_init\n");
	tasklet_init(&tasklet,irq_tasklet_action,data);
	printk("the state of the tasklet after tasklet_init is:%ld\n",(&tasklet)->state);
	if(!test_and_set_bit(TASKLET_STATE_SCHED,&tasklet.state))
		__tasklet_schedule(&tasklet);

	printk("the state of the tasklet after __tasklet_schedule is:%ld\n",
			(&tasklet)->state);
	printk("out __tasklet_schedule_init\n");
	return 0;	
}
static void __exit __tasklet_schedule_exit(void)
{
	printk("Goodbye __tasklet_schedule\n");
	return 0;
}
module_init(__tasklet_schedule_init);
module_exit(__tasklet_schedule_exit);
